-- GENERATED SPELL FOR [Plagued Dragonflayer Handler] --


function spell0_24199(pUnit, Event) --@Plague Blight,n/a--
pUnit:FullCastSpellOnTarget(43506,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24199', 30320, 1)
end

function spell1_24199(pUnit, Event) --@Plagued Blood Explosion,Self--
pUnit:FullCastSpellOnTarget(42167,pUnit)
pUnit:RegisterEvent('Sorts_24199', 2278, 1)
end

function Sorts_24199(pUnit, Event)
local choix_sorts_24199 = math.random(0, 1)
if choix_sorts_24199 == 0 then
pUnit:RegisterEvent('spell0_24199', 1, 1)
end
if choix_sorts_24199 == 1 then
pUnit:RegisterEvent('spell1_24199', 1, 1)
end
end

function mob24199_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24199', math.random(1500, 3000), 1)
end

function mob24199_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24199_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24199_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24199, 1, 'mob24199_Action')
RegisterUnitEvent(24199, 2, 'mob24199_Leave')
RegisterUnitEvent(24199, 3, 'mob24199_Kill')
RegisterUnitEvent(24199, 4, 'mob24199_Die')
